package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotGuestMapper;
import com.gaohe.hotal.domain.HotGuest;
import com.gaohe.hotal.service.IHotGuestService;

/**
 * 客户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotGuestServiceImpl implements IHotGuestService 
{
    @Autowired
    private HotGuestMapper hotGuestMapper;

    /**
     * 查询客户
     * 
     * @param guestId 客户主键
     * @return 客户
     */
    @Override
    public HotGuest selectHotGuestByGuestId(Long guestId)
    {
        return hotGuestMapper.selectHotGuestByGuestId(guestId);
    }

    /**
     * 查询客户列表
     * 
     * @param hotGuest 客户
     * @return 客户
     */
    @Override
    public List<HotGuest> selectHotGuestList(HotGuest hotGuest)
    {
        return hotGuestMapper.selectHotGuestList(hotGuest);
    }

    /**
     * 新增客户
     * 
     * @param hotGuest 客户
     * @return 结果
     */
    @Override
    public int insertHotGuest(HotGuest hotGuest)
    {
        hotGuest.setCreateTime(DateUtils.getNowDate());
        return hotGuestMapper.insertHotGuest(hotGuest);
    }

    /**
     * 修改客户
     * 
     * @param hotGuest 客户
     * @return 结果
     */
    @Override
    public int updateHotGuest(HotGuest hotGuest)
    {
        hotGuest.setUpdateTime(DateUtils.getNowDate());
        return hotGuestMapper.updateHotGuest(hotGuest);
    }

    /**
     * 批量删除客户
     * 
     * @param guestIds 需要删除的客户主键
     * @return 结果
     */
    @Override
    public int deleteHotGuestByGuestIds(Long[] guestIds)
    {
        return hotGuestMapper.deleteHotGuestByGuestIds(guestIds);
    }

    /**
     * 删除客户信息
     * 
     * @param guestId 客户主键
     * @return 结果
     */
    @Override
    public int deleteHotGuestByGuestId(Long guestId)
    {
        return hotGuestMapper.deleteHotGuestByGuestId(guestId);
    }
}
